package com.itheima.exceptionHandle;

import com.itheima.entity.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ExceptionHandle {
    @ExceptionHandler(Exception.class)
    public Result ExceptionHandle(Exception e) {
        return new Result(false,e.getMessage());
    }
}
